Integrand size = 25, antiderivative size = 106 \[ \int (1+\sin (e+f x))^m (3+\sin (e+f x))^{-1-m} \, dx=-\frac {2^{-\frac {1}{2}-m} \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2}-m,\frac {3}{2},\frac {1-\sin (e+f x)}{3+\sin (e+f x)}\right ) (1+\sin (e+f x))^{-1+m} \left (\frac {1+\sin (e+f x)}{3+\sin (e+f x)}\right )^{\frac {1}{2}-m} (3+\sin (e+f x))^{-m}}{f} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {2867, 134} \[ \int (1+\sin (e+f x))^m (3+\sin (e+f x))^{-1-m} \, dx=-\frac {2^{-m-\frac {1}{2}} \cos (e+f x) (\sin (e+f x)+1)^{m-1} \left (\frac {\sin (e+f x)+1}{\sin (e+f x)+3}\right )^{\frac {1}{2}-m} (\sin (e+f x)+3)^{-m} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2}-m,\frac {3}{2},\frac {1-\sin (e+f x)}{\sin (e+f x)+3}\right )}{f} \]
[In]
[Out]
Rule 134
Rule 2867
Rubi steps \begin{align*} \text {integral}& = \frac {\cos (e+f x) \text {Subst}\left (\int \frac {(1+x)^{-\frac {1}{2}+m} (3+x)^{-1-m}}{\sqrt {1-x}} \, dx,x,\sin (e+f x)\right )}{f \sqrt {1-\sin (e+f x)} \sqrt {1+\sin (e+f x)}} \\ & = -\frac {2^{-\frac {1}{2}-m} \cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2}-m,\frac {3}{2},\frac {1-\sin (e+f x)}{3+\sin (e+f x)}\right ) (1+\sin (e+f x))^{-1+m} \left (\frac {1+\sin (e+f x)}{3+\sin (e+f x)}\right )^{\frac {1}{2}-m} (3+\sin (e+f x))^{-m}}{f} \\ \end{align*}
Result contains complex when optimal does not.
Time = 2.13 (sec) , antiderivative size = 245, normalized size of antiderivative = 2.31 \[ \int (1+\sin (e+f x))^m (3+\sin (e+f x))^{-1-m} \, dx=\frac {\cos ^2\left (\frac {1}{2} (e+f x)\right ) \operatorname {Hypergeometric2F1}\left (1+m,1+2 m,2 (1+m),\frac {2 \sqrt {2} \left (1+\tan \left (\frac {1}{2} (e+f x)\right )\right )}{-i+\sqrt {2}+\left (i+\sqrt {2}\right ) \tan \left (\frac {1}{2} (e+f x)\right )}\right ) \left (\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2}{3+\sin (e+f x)}\right )^m \left (-i+2 \sqrt {2}-3 i \tan \left (\frac {1}{2} (e+f x)\right )\right ) \left (1+\tan \left (\frac {1}{2} (e+f x)\right )\right ) \left (-\frac {i+\sqrt {2}+\left (-i+\sqrt {2}\right ) \tan \left (\frac {1}{2} (e+f x)\right )}{-i+\sqrt {2}+\left (i+\sqrt {2}\right ) \tan \left (\frac {1}{2} (e+f x)\right )}\right )^m}{\left (i+\sqrt {2}\right ) f (1+2 m) (3+\sin (e+f x))} \]
[In]
[Out]
\[\int \left (\sin \left (f x +e \right )+1\right )^{m} \left (3+\sin \left (f x +e \right )\right )^{-1-m}d x\]
[In]
[Out]
\[ \int (1+\sin (e+f x))^m (3+\sin (e+f x))^{-1-m} \, dx=\int { {\left (\sin \left (f x + e\right ) + 3\right )}^{-m - 1} {\left (\sin \left (f x + e\right ) + 1\right )}^{m} \,d x } \]
[In]
[Out]
\[ \int (1+\sin (e+f x))^m (3+\sin (e+f x))^{-1-m} \, dx=\int \left (\sin {\left (e + f x \right )} + 1\right )^{m} \left (\sin {\left (e + f x \right )} + 3\right )^{- m - 1}\, dx \]
[In]
[Out]
\[ \int (1+\sin (e+f x))^m (3+\sin (e+f x))^{-1-m} \, dx=\int { {\left (\sin \left (f x + e\right ) + 3\right )}^{-m - 1} {\left (\sin \left (f x + e\right ) + 1\right )}^{m} \,d x } \]
[In]
[Out]
\[ \int (1+\sin (e+f x))^m (3+\sin (e+f x))^{-1-m} \, dx=\int { {\left (\sin \left (f x + e\right ) + 3\right )}^{-m - 1} {\left (\sin \left (f x + e\right ) + 1\right )}^{m} \,d x } \]
[In]
[Out]
Timed out. \[ \int (1+\sin (e+f x))^m (3+\sin (e+f x))^{-1-m} \, dx=\int \frac {{\left (\sin \left (e+f\,x\right )+1\right )}^m}{{\left (\sin \left (e+f\,x\right )+3\right )}^{m+1}} \,d x \]
[In]
[Out]